package com.tengju.data.domain.model.report;


import com.tengju.data.domain.model.analysis.Row;
import com.tengju.data.domain.model.user.UserIdCode;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

public interface AchievementBonusLogRepository {


    List<AchievementBonus> listByLogTimeAndMonth(LocalDateTime logTime, Integer month);

    int countByLogTimeAndMonth(LocalDateTime logTime, Integer month);

    List<AchievementBonus> listByLeaderUser(LocalDateTime logTime, Integer month, Long idCode);

    List<AchievementBonus> listSettleByLeaderUser(LocalDateTime logTime,
                                                  Integer month,
                                                  Integer teamRatioType,
                                                  Long idCode);


    LocalDateTime queryMaxLogTime(UserIdCode idCode, Integer month);

    List<AchievementBonus> listByParents(@NotNull LocalDateTime logTime,
                                         @NotNull Integer month,
                                         List<Long> allPIdCodeList);

    List<Row> listLogTimeWithMonth();

    void archive(LocalDateTime logTime, String archiveTableName);

    void deleteWithLogTime(LocalDateTime logTime);

    List<AchievementBonusLog> listWithRange(long idCode, int month, LocalDate queryDate, LocalDate plusDays);

    List<LocalDateTime> queryLogTime(long idCode, long month, LocalDateTime startTime, LocalDateTime endTime);


}
